2

Palettes

Palettes are movable interface windows that provide you with the~commands and features you need to complete specific tasks. Palettes are especially convenient because they can be placed anywhere on your screen, allowing you to customize your workspace. Click and drag the bar at the top of a palette to reposition it. You can resize most palettes by dragging the resize box in the lower right corner of the palette.

Avenue.quark provides you with the XML Workspace palette, which displays an XML document as an easy-to-understand hierarchical "tree." You can use the XML Workspace palette to create, edit, view, and save XML documents from within QuarkXPress.


XML Workspace Palette

The XML Workspace palette (File > New > XML) lets you view and edit the content of an XML document.

XML Workspace palette


Save (button)

The Save button saves the active XML document. If the active XML document has not yet been saved, clicking the Save button displays a dialog box that lets you specify the name, location, type, and character encoding for the document. See "Save As dialog box" in this section.


Save As (button)

The Save As button displays the Save As dialog box, which lets you specify the name, location, type, and character encoding for the active XML document. See "Save As dialog box" in this section.


Save As (dialog box)

The Save As dialog box lets you specify the name, location, type and character encoding for the active XML document.

Save As dialog box


Revert to Saved (button)

The Revert to Saved button lets you discard changes and restore the active XML document to the most recently saved version.


Preview XML (button)

The Preview XML button displays the Preview XML dialog box, which lets you view the active XML document as XML text. You can copy and paste from this window, but you cannot edit the text.

Preview XML dialog box

Although upper-ASCII characters (characters above ASCII 127) display unaltered in the Preview XML dialog box, such characters are converted to the appropriate codes at export depending on the encoding method you choose in the Save As dialog box.



Drag and Drop (button)

In QuarkXPress 4.1 and later, avenue.quark drag and drop is enabled whenever the QuarkXPress Drag and Drop Text check box (Edit > Preferences > Application > Interactive tab) is checked.

In versions of QuarkXPress prior to 4.1, the Drag and Drop button controls how dragging works. When the button is on in the active XML Workspace palette, avenue.quark drag-and-drop mode overrides QuarkXPress drag-and-drop mode. This means you can drag and drop text only onto an element or attribute in the XML Workspace palette, and you can drag and drop pictures onto elements or attributes in the XML Workspace palette. When the button is off or no XML Workspace palettes are displayed, dragging works as if avenue.quark were not installed.

Turning the Drag and Drop button on or off in one XML Workspace palette turns it on or off in all open XML Workspace palettes.

Avenue.quark drag and drop is different from the QuarkXPress Drag and Drop Text feature (Edit > Preferences > Application > Interactive tab). In versions of QuarkXPress prior to 4.1, Drag and Drop Text does not work when the avenue.quark Drag and Drop button is on.


Synchronize Content (button)

The Synchronize Content button synchronizes the content of elements in the active XML document with the corresponding content in the active QuarkXPress document or documents. This button is available only when Enable Dynamic Content Update (Edit > Preferences > avenue.quark) is unchecked.


Pencil (icon)

When multiple XML documents are open, a pencil icon is displayed in the upper right corner of the XML Workspace palette for the active XML document.


Tagging Rule Set (pop-up menu)

The Tagging Rule Set pop-up menu lets you choose a tagging rule set for use with the active XML document. This pop-up menu displays only those tagging rule sets that are associated with the active XML document.

Tagging Rule Set pop-up menu


XML Tree (list)

The XML Tree list displays a hierarchical tree representation of the XML document. You can display and hide the contents of container elements and attributes by clicking the and icons (Mac OS) and the and icons (Windows). You can scroll through the XML tree with the horizontal and vertical bars and with the arrow keys.

XML Tree list

Different types of items in the XML Tree list have different icons:


Content Preview (list)

The Content Preview list displays the content of the element, attribute, or comment selected in the left side of the list. Content that is too large to display fully is indicated with an ellipsis (...).

Content Preview list

An attribute's content is handled differently according to its type (which is specified in the DTD). The content of different attribute types is displayed as follows:

If an element, comment, PCDATA block, or processing instruction is linked to content in a QuarkXPress document, and that content has changed since the last time the XML document was closed, the right side of the XML Tree list displays a icon.

Both the right side of the XML Tree list and the Content field display the content of the selected element, comment, or processing instruction. You can edit the content in the Content field.



XML Tree (pop-up menu)

Control+clicking (Mac OS) or right+clicking (Windows) an element displays a pop-up menu with the following options (note that not all of the following options are available for all elements):

XML Tree pop-up menu

When you choose Insert Child, Insert Sibling Before, Insert Sibling After, or Replace, a submenu is displayed, containing a list of the items that may legally be inserted or substituted. This submenu also contains an Insert with Preview menu item, which displays a preview dialog box.

A preview dialog box.

Click OK to complete the insertion or replacement, or Cancel to abort it.

Some elements have mandatory children. If you insert such an element, its mandatory children must also be inserted. Clicking an element's (Mac OS) or (Windows) icon displays any child elements that must also be inserted along with that element. Clicking this icon does not display any optional children an element might have.


If an inserted element requires one of a list of non-optional elements (for example, (a | b | c)), avenue.quark uses the first element in the list (here, a). If the element requires one of a list of elements, and one or more of those elements is optional (for example, (a | b | c?)), avenue.quark leaves the element empty.



Content (area)

The Content area lets you add to, edit, and delete the content of the element, attribute, or comment selected in the XML Tree list.

Content area

Both the right side of the XML Tree list and the Content field display the content of the selected element, attribute, or comment.



Break Dynamic Link (button)

If you drag content from a QuarkXPress document to an attribute or element, a link is formed between that content and the element in the XML document. This means you can edit the content of the XML document only by editing the content in the QuarkXPress document.

If you want to sever the link between an element in the active XML file and the QuarkXPress document from which it came, simply select the element name in the XML Tree list and then click the Break Dynamic Link button.

Break Dynamic Link button


Generate ID (button)

For ID attributes, the Generate ID button is available in the Content area. This button replaces the current content of the selected attribute with an automatically generated value that is unique within the active XML file. See "ID Attributes" in this section.

Generate ID button


Content (field)

The Content field lets you edit the content of elements and attributes that are not linked to QuarkXPress content. Except for some types of attributes, the Content field supports cutting, copying, and pasting.

Content field

The Content field works differently for some types of attributes, as indicated below.

Enumerated attributes

Content field for enumerated attribute

ID attributes

An ID attribute may contain only a value that meets the following two criteria:

For ID attributes, the Generate ID button is available in the Content area. This button replaces the current contents of the selected attribute with an automatically-generated value that is unique within the active XML file.

IDREF attributes

An IDREF attribute may contain only an ID attribute value that is used either elsewhere in the active XML document or in an XML document referred to by the active XML document.

For IDREF attributes, the Content field displays a list of the ID attributes used in the active XML document, plus an Other option. Clicking Other displays a dialog box that lets you enter an IDREF value. You can select only one IDREF value at a time. The Other option is selected by default.

Content field for IDREF attribute

IDREFS attributes

An IDREFS attribute may contain one or more ID attribute values that are used either elsewhere in the active XML document or in an XML document referred to by the active XML document.

For IDREFS attributes, the Content field displays a list of the ID attributes used in the active XML document, plus an Other option. Clicking Other displays a dialog box that lets you enter an IDREF value. You can select as many IDREF values as you like.

Content field for IDREFS attribute

NMTOKEN attributes

A NMTOKEN attribute may contain only a value that begins with a letter, underscore, or colon, with remaining characters consisting of letters, digits, underscores, hyphens, and colons, but no spaces.

For NMTOKEN attributes, the Content field will accept only one NMTOKEN value.

NMTOKENS attributes

A NMTOKENS attribute may contain a series of values that begin with a letter, underscore, or colon, with remaining characters consisting of letters, digits, underscores, hyphens, and colons, but no spaces.

For NMTOKENS attributes, the Content field will accept a series of NMTOKEN values, separated by single spaces.

ENTITY attributes

An ENTITY attribute may contain only the name of an entity defined within the active XML document. For ENTITY attributes, the Content field displays a list of the entities defined in the active XML document. You can select only one entity name at a time.

If there is a default entity value, it is selected. If not, the first entity value is selected by default.

Content field for ENTITY attribute

ENTITIES attributes

An ENTITIES attribute may contain only a list of entities defined within the active XML document. For ENTITIES attributes, the Content field displays a list of the entities defined in the active XML document. You can select as many of these entity values as you like.

Content field for ENTITIES attribute